package com.xinqi.modules.prepare.homework.dto.req;

import com.xinqi.common.green.annotation.Text;
import com.xinqi.modules.prepare.common.PrepareLimitConstant;
import com.xinqi.common.base.dto.CommonFileDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

/**
 * 备课区作业-请求对象-修改
 *
 * @author: system
 * @date: 2023/03/19
 */
@Data
@Schema(description = "备课区作业-请求对象-修改")
public class PrepareHomeworkUpdateDTO implements Serializable {
    /**
     * 主键
     */
    @Schema(description = "主键", example = "")
    private Long id;
    /**
     * 名称
     */
    @Text
    @Schema(description = "名称", example = "")
    @NotBlank(message = "名称不能为空")
    @Size(max = PrepareLimitConstant.NAME_WORKS_LIMIT, message = "名称不能超过15个字")
    private String name;
    /**
     * 内容
     */
    @Text
    @Schema(description = "内容", example = "")
    @Size(max = PrepareLimitConstant.CONTENT_WORKS_LIMIT, message = "内容不能超过300个字")
    private String content;
    /**
     * 文件列表
     */
    @Schema(description = "文件列表", example = "")
    private List<CommonFileDTO> files;
}
